This invention relates to a method of and apparatus for ascertaining the classification of the shape of an object based upon deriving a set of values for features representative of the shape of the object. In particular the invention relates to a method of and apparatus for ascertaining the classification of the shape of a succession of objects so that they can be sorted according to shape, including the steps of feeding each successive object through a viewing zone and illuminating the object as it passes through the viewing zone, viewing the object in the viewing zone, processing the image of the object in the viewing zone and thereafter directing the object into one of at least two paths according to its shape. The objects may be for instance edible products such as peas or sweets, but the invention is in no way limited to edible products.